package com.gruopbuying.agent.connector;

import com.gruopbuying.agent.utils.ApiResult;
import com.gruopbuying.agent.utils.PageUtils;
import com.gruopbuying.agent.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @Author: cuich
 * @Email cuichanghao@linku.com.cn
 * @Date: 2019/5/28 17:47
 * @Des 服务商中心接口连接器
 */
@Service
@FeignClient(name = "bus-store")
public interface StoreFeign {

    // 获取服务商列表
    @RequestMapping(value = "/agent/store/storeAccount/list", method = RequestMethod.GET)
    PageUtils getStoreAccountList(@RequestParam Map<String, Object> params);
    //添加代理商
   // @PostMapping("/agent/store/storeAccount/save")
    @RequestMapping(value = "/agent/store/storeAccount/save", method = RequestMethod.POST)
    R save(@RequestParam Map<String, Object> params);
    //通过代理商添加服务商
    @RequestMapping(value = "/agent/store/storeAccount/addAccount", method = RequestMethod.POST)
    ApiResult addAccount(@RequestParam Map<String, Object> params);
    //通过代理商id获取服务商门店列表
    @RequestMapping(value = "/agent/store/storeAccount/storeMainInfoListByAgent", method = RequestMethod.GET)
    PageUtils storeMainInfoListByAgent(@RequestParam Map<String, Object> params);
    //通过代理商id获取门店运营人员列表
    @RequestMapping(value = "/agent/store/storeAccount/getStoreOperList", method = RequestMethod.GET)
    PageUtils getStoreOperList(@RequestParam Map<String, Object> params);
    //更改状态接口
    @RequestMapping(value = "/agent/store/storeAccount/updateStatus", method = RequestMethod.POST)
    ApiResult updateStatus(@RequestParam Map<String, Object> params);
}